﻿// /*
//  * @Author: wanyiming
//  * @Date:2024-04-10-21:37
//  * @Description:
//  */

using System;
using QFramework;
using UnityEngine;
using Object = UnityEngine.Object;

namespace Code.Core.CoreBaseClass
{
    public abstract class BaseController : MonoBehaviour,IController
    {

        protected T GetComment<T>() where T : Object, new()
        {
            T[] findObjectsOfType = FindObjectsOfType<T>();
            if (findObjectsOfType.Length > 0) return findObjectsOfType[0];
            throw new Exception("未找到对象！！！！");
        }

        public void PrintLogger(string message)
        {
            Debug.Log(this.GetType().FullName+"记录日志："+message);
        }


        public abstract IArchitecture GetArchitecture();
    }
}